CREATE TABLE [dbo].[SUPLIDORES]
(
[ID] [numeric] (10, 0) NOT NULL,
[SUPLIDOR] [varchar] (80) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VENDEDOR] [varchar] (80) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[RNC] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DIRECCION] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ID_CIUDAD] [numeric] (10, 0) NOT NULL,
[TELEFONO1] [varchar] (14) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[TELEFONO2] [varchar] (14) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF_SUPLIDORES_TELEFONO2] DEFAULT ((0)),
[FAX] [varchar] (14) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF_SUPLIDORES_FAX] DEFAULT ((0)),
[OTRO] [varchar] (14) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF_SUPLIDORES_OTRO] DEFAULT ((0)),
[EMAIL] [varchar] (80) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF_SUPLIDORES_EMAIL] DEFAULT (''),
[WEB] [varchar] (80) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF_SUPLIDORES_WEB] DEFAULT (''),
[OBSERVACIONES] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF_SUPLIDORES_OBSERVACIONES] DEFAULT (''),
[CUENTA] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF_SUPLIDORES_CUENTA] DEFAULT ((0)),
[ID_BANCO] [numeric] (10, 0) NOT NULL,
[ID_MONEDA] [numeric] (10, 0) NOT NULL,
[PLAZO_PAGO] [numeric] (10, 0) NOT NULL CONSTRAINT [DF_SUPLIDORES_PLAZO_PAGO] DEFAULT ((0)),
[ACTIVO] [bit] NOT NULL CONSTRAINT [DF_SUPLIDORES_ACTIVO] DEFAULT ((1)),
[MONTO_ADEUDADO] [numeric] (10, 2) NOT NULL CONSTRAINT [DF_SUPLIDORES_MONTO_ADEUDADO] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SUPLIDORES] ADD CONSTRAINT [PK_SUPLIDORES] PRIMARY KEY CLUSTERED  ([ID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SUPLIDORES] ADD CONSTRAINT [IX_SUPLIDORES] UNIQUE NONCLUSTERED  ([SUPLIDOR]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SUPLIDORES] ADD CONSTRAINT [FK_SUPLIDORES_BANCOS] FOREIGN KEY ([ID_BANCO]) REFERENCES [dbo].[BANCOS] ([ID])
GO
ALTER TABLE [dbo].[SUPLIDORES] ADD CONSTRAINT [FK_SUPLIDORES_CIUDADES] FOREIGN KEY ([ID_CIUDAD]) REFERENCES [dbo].[CIUDADES] ([ID])
GO
ALTER TABLE [dbo].[SUPLIDORES] ADD CONSTRAINT [FK_SUPLIDORES_MONEDAS] FOREIGN KEY ([ID_MONEDA]) REFERENCES [dbo].[MONEDAS] ([ID])
GO
